package com.bbird.od.finance.service.models;

import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.*;
import com.bbird.od.finance.service.models.excel.EnumToExcelConverter;
import com.bbird.od.finance.service.models.type.FinallyReceiveType;
import com.bbird.od.finance.service.models.type.HomeOrderType;
import com.bbird.od.finance.service.models.type.YesOrNo;
import lombok.Data;

import java.math.BigDecimal;

/**
 * @author ziyang Kuang
 * @date 2020/11/16
 * @describe
 */
@HeadFontStyle(fontHeightInPoints = 12)
@ColumnWidth(15)
@HeadRowHeight(15)
@HeadStyle(wrapped = false)
@Data
public class ReconciliationResult {
    // 订单编号
    @ExcelProperty("订单编号")
    private String homeOrderNumber;
    // 拼单时的主订单号
    @ExcelProperty("主订单号")
    private String mainHomeOrderNumber;
    // 单据类别
    @ExcelProperty(value = "单据类别", converter = EnumToExcelConverter.class)
    private HomeOrderType homeOrderType;
    // 应收金额
    @ExcelProperty("应收金额")
    private BigDecimal receivableAmount = BigDecimal.ZERO;
    // 实收金额
    @ExcelProperty("实收金额")
    private BigDecimal receivedAmount = BigDecimal.ZERO;
    // 实收货款
    @ExcelProperty("实收货款")
    private BigDecimal actualReceivableGoodsAmount = BigDecimal.ZERO;
    // 实收运费
    @ExcelProperty("实收运费")
    private BigDecimal actualReceivableTransportationAmount = BigDecimal.ZERO;
    // 佣金
    @ExcelProperty("佣金")
    private BigDecimal commission = BigDecimal.ZERO;
    // 京豆
    @ExcelProperty("京豆")
    private BigDecimal jingdou = BigDecimal.ZERO;
    // 退款金额
    @ExcelProperty("退款金额")
    private BigDecimal refundAmount = BigDecimal.ZERO;
    // 退货款 = 退款-货款
    @ExcelProperty("退货款")
    private BigDecimal refundReceivableGoodsAmount = BigDecimal.ZERO;
    // 退运费 =退款-运费
    @ExcelProperty("退运费")
    private BigDecimal refundReceivableTransportationAmount = BigDecimal.ZERO;
    // 退佣金 = 退款-佣金
    @ExcelProperty("退佣金")
    private BigDecimal refundCommission = BigDecimal.ZERO;
    // 退京豆 = 退款-京豆
    @ExcelProperty("退京豆")
    private BigDecimal refundJingdou = BigDecimal.ZERO;
    // 退货订单号
    @ExcelProperty("退货订单号")
    private String refundHomeOrderNumber;
    // 是否退款
    @ExcelProperty(value = "是否退款", converter = EnumToExcelConverter.class)
    private YesOrNo refunded = YesOrNo.NO;
    // 应收-实收
    @ExcelProperty("应收-实收")
    private BigDecimal diffReceivableAmount = BigDecimal.ZERO;
    // 是否拼单
    @ExcelProperty(value = "是否拼单", converter = EnumToExcelConverter.class)
    private YesOrNo merger = YesOrNo.NO;
    // 是否预收
    @ExcelProperty(value = "是否预收", converter = EnumToExcelConverter.class)
    private FinallyReceiveType finallyReceiveType = FinallyReceiveType.NORMAL;
    // 是否核销
    @ExcelProperty(value = "是否核销", converter = EnumToExcelConverter.class)
    private YesOrNo writeOff = YesOrNo.NO;
}
